package com.bestcem.xm.txtanls.grpc.service.param.survey;


import com.bestcem.xm.common.core.constant.RegTypes;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 获取问卷分析项目入参校验
 *
 * @author XiaoYunSong <ys.xiao@idiaoyan.com>
 * @version v1.0
 * @date 2021/5/8
 */
@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
public class GetSurveyAnalysisProjectParam {

    /**
     * 问卷id
     */
    @NotBlank(message = ErrorMessage.SURVEY_ID_ERROR)
    @Pattern(regexp = RegTypes.OBJECT_ID, message = ErrorMessage.SURVEY_ID_ERROR)
    private String surveyId;

    /**
     * 用户id
     */
    @NotBlank(message = ErrorMessage.USER_ID_ERROR)
    @Pattern(regexp = RegTypes.OBJECT_ID, message = ErrorMessage.USER_ID_ERROR)
    private String userId;

    /**
     * 组织id
     */
    @NotBlank(message = ErrorMessage.ORG_ID_ERROR)
    @Pattern(regexp = RegTypes.OBJECT_ID, message = ErrorMessage.ORG_ID_ERROR)
    private String orgId;

    public static class ErrorMessage {
        public static final String USER_ID_ERROR = "用户id错误";
        public static final String ORG_ID_ERROR = "组织id错误";
        public static final String SURVEY_ID_ERROR = "问卷id错误";
    }
}
